<link href="<?php echo Yii::app()->request->baseUrl; ?>/css/style/style_news.css" rel="stylesheet" type="text/css" />
<!--正文start-->
<?php (isset($_GET['page']))?$page=$_GET['page']:$page='';?>
<div class="w_960 o_a">
    <?php $this->renderPartial('/news/sidebar_nav',array('id'=>$id));?>
	<div class="news_center mt10 c_f">
    	<div class="col_main f_l">
        	<div class="news_list bg_fff">
        		<div class="position ff_s">当前位置 ：<?php echo CHtml::link('资讯中心', array('/home/news/index'));?> &gt; <?php echo $cat->znc_title;?></div>
                <div class="news_info">
                    <div class="news_info_t">
                        <h1 class="fs_24 c_blue3 t_c"><?php echo $news->zne_title;?></h1>
                        <p class="infos t_c c_999">点击数：<?php echo $news->zne_hits;?>次&nbsp;&nbsp;&nbsp;&nbsp;发表时间：<?php echo date('Y-m-d', $news->inputtime);?>&nbsp;&nbsp;&nbsp;&nbsp;来源：<?php echo $news->zne_source;?></p>
                        <div class="content fs_14">
                            <div class="lead fs_14 line_24"><strong>导语：</strong><?php echo $news->zne_desc;?></div>
                            <div class="info">
                                <center><?php echo ($page==1||!$page)?Tool::thumb($news->zne_thumb,400,400, $news->zne_short):'';?></center>
                                <p class="txt">
								<?php 
									//关键词替换
									$keylink = KeyLink::model()->findAll();
									foreach($keylink as $key=>$var)
									{
										$replace[$key] = CHtml::link($var->zkl_title, $var->zkl_url, array('target'=>$var->zkl_target));
										$find[$key] = $var->zkl_title;
									}
									$content =str_replace($find,$replace,$news->zne_content);
                                    //文章分页
                                    $ArrayContent = explode("[pages]",$content);
                                    echo ($page)?$ArrayContent[$page-1]:$ArrayContent[0];
								?>
								</p>
                             </div>
                        </div>
                         <?php
                            //显示文章页码
                            if(count($ArrayContent)>1){
                                echo '<div class="list_page min_list_page"><ul>';
                                for($i=1;$i<=count($ArrayContent);$i++)
                                {
                                    if(!$page){$page=1;};
                                    echo '<li ',($page==$i)?'class="selected"':'','>',CHtml::link($i, array('/home/news/detail', 'id'=>$news->zne_id, 'page'=>$i), array('class'=>'')),'</li> ';
                                }
                                 echo "</ul></div>";
                             }
                        ?>
                        <div class="content_d c_f">
                        	<div class="share f_r">
                                <!-- Baidu Button BEGIN -->
                                <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
                                	<span class="f_l shareto">分享到：</span>
                                    <a class="bds_qzone"></a>
                                    <a class="bds_tsina"></a>
                                    <a class="bds_tqq"></a>
                                    <a class="bds_renren"></a>
                                    <a class="bds_kaixin001"></a>
                                    <a class="bds_tsohu"></a>
                                    <a class="bds_douban"></a>
                                    <a class="bds_t163"></a>
                                    <a class="bds_taobao"></a>
                                    <a class="bds_tqf"></a>
                                    <span class="bds_more">更多</span>
                                </div>
                                <script type="text/javascript" id="bdshare_js" data="type=tools&amp;uid=3904611" ></script>
                                <script type="text/javascript" id="bdshell_js"></script>
                                <script type="text/javascript">
                                    document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
                                </script>
                                <!-- Baidu Button END -->
                            </div>    
                            <p class="keywords c_blue3 f_l">关键字： 
							<?php   $tag = str_replace(',', ' ', $news->zt_ids);
								$tags = explode(' ',$tag);
								for ($i= 0;$i< count($tags); $i++){
                                    $tag = Tag::model()->findByPk($tags[$i]);
									$str = $tag->attributes['zt_title'];
                                    echo CHtml::link($str, array('/home/news/list/','tag'=>$str)).' ';
                                }?></p>
                        </div>
                        <div class="fanye fs_14">
                        <span>上一篇：<?php if($prev){echo CHtml::link($prev[0]->zne_short, array('/home/news/detail', 'id'=>$prev[0]->zne_id), array('title'=>$prev[0]->zne_title, 'class'=>'c_blue3'));}else{echo '没有文章了';}?></span><span>下一篇：<?php if($next){echo CHtml::link($next[0]->zne_short, array('/home/news/detail', 'id'=>$next[0]->zne_id), array('title'=>$next[0]->zne_title, 'class'=>'c_blue3'));}else{echo '没有文章了';}?></span>
                        </div>
                    </div>
                    <div class="related ">
                        <h3 class="fs_14">相关内容</h3>
                        <ul class="news_li c_f">
						<?php foreach($news_about as $row):?>
                            <li><?php echo CHtml::link($row->zne_short, array('/home/news/detail', 'id'=>$row->zne_id));?></li>
                        <?php endforeach;?>
						</ul>
                     </div>
                </div>
            </div>
			<!-- 精彩视频栏目下C 广告位  250*100 start -->
            <div class="mt10">
				<?php $adzone = Adzone::model()->getData(83);
                    foreach( (array)$adzone['ads'] as $key=>$value){?>
                    <?php echo CHtml::link(CHtml::image($value['zds_file_url'],$value['zdz_desc'],array('height'=>$adzone['zdz_height'],'width'=>$adzone['zdz_width'])),$value['zds_url'],array('target'=>'_blank'))?>
                <?php }?>
			</div>
			<!-- 广告位 end -->
            <!--产品推荐 start-->
            <div class="pro_recommend mt10">
                <div class="hd"><h2 class="fs_14 c_white">产品推荐</h2></div>
                <div class="bd pro_list bg_fff">
                    <ul class="c_f">
                       <?php if ($hotpro) {                        
                        foreach ($hotpro as $i) {
                            ?>
                            <li class="item">
                                <div class="c_img c_img120"><?php echo CHtml::link( Tool::thumb( $i->zp_pic,120,120,$i->zp_name ),array('/home/product/detail/', 'id'=>$i->zp_id ),array('target'=>'_blank','title'=>$i->zp_name) ) ?></div>
                                <p class="price ff_yh"><strong class="fs_15 c_orange f_r">&yen;<?php echo $i->zp_price;?></strong><del class="c_999">&yen;<?php echo $i->zp_saleprice;?></del></p>
                                <p class="title c_666 t_c"><?php echo CHtml::link($i->getTitle(), array('/home/product/detail', 'id' => $i->zp_id), array('title' => '点击购买'))?></p>
								 <p class="buy"><?php echo CHtml::link('点击购买', array('/home/product/detail', 'id' => $i->zp_id), array('title' => '点击购买', 'class'=>'btn btn_buy'))?></p>
                            </li>                          
                            <?php
                        }                        
                    } else {
                        ?>
                        <p style="text-align:center">没有找到商品!</p>
                    <?php } ?> 
                    </ul>
                </div>
            </div>
            <!--产品推荐 end-->
        </div>
        <?php $this->renderPartial('/news/sidebar_right',array('subject'=>$subject,'id'=>$id));?>
    </div>
</div>
<!--正文end-->
<script type="text/javascript">
$(function(){
    $('.txt img').LoadImage(true,628,1024);
});
</script>